3.33 \(\int (a+b \tan ^{-1}(c+d x))^2 \, dx\)

Optimal. Leaf size=102 \[ \frac{i b^2 \text{PolyLog}\left (2,1-\frac{2}{1+i (c+d x)}\right )}{d}+\frac{(c+d x) \left (a+b \tan ^{-1}(c+d x)\right )^2}{d}+\frac{i \left (a+b \tan ^{-1}(c+d x)\right )^2}{d}+\frac{2 b \log \left (\frac{2}{1+i (c+d x)}\right ) \left (a+b \tan ^{-1}(c+d x)\right )}{d} \]

[Out]

(I*(a + b*ArcTan[c + d*x])^2)/d + ((c + d*x)*(a + b*ArcTan[c + d*x])^2)/d + (2*b*(a + b*ArcTan[c + d*x])*Log[2
/(1 + I*(c + d*x))])/d + (I*b^2*PolyLog[2, 1 - 2/(1 + I*(c + d*x))])/d

________________________________________________________________________________________

Rubi [A]  time = 0.106977, antiderivative size = 102, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {5039, 4846, 4920, 4854, 2402, 2315} \[ \frac{i b^2 \text{PolyLog}\left (2,1-\frac{2}{1+i (c+d x)}\right )}{d}+\frac{(c+d x) \left (a+b \tan ^{-1}(c+d x)\right )^2}{d}+\frac{i \left (a+b \tan ^{-1}(c+d x)\right )^2}{d}+\frac{2 b \log \left (\frac{2}{1+i (c+d x)}\right ) \left (a+b \tan ^{-1}(c+d x)\right )}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTan[c + d*x])^2,x]

[Out]

(I*(a + b*ArcTan[c + d*x])^2)/d + ((c + d*x)*(a + b*ArcTan[c + d*x])^2)/d + (2*b*(a + b*ArcTan[c + d*x])*Log[2
/(1 + I*(c + d*x))])/d + (I*b^2*PolyLog[2, 1 - 2/(1 + I*(c + d*x))])/d

Rule 5039

Int[((a_.) + ArcTan[(c_) + (d_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Dist[1/d, Subst[Int[(a + b*ArcTan[x])^p, x],
 x, c + d*x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[p, 0]

Rule 4846

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTan[c*x])^p, x] - Dist[b*c*p, Int[
(x*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^2*x^2), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 0]

Rule 4920

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> -Simp[(I*(a + b*ArcTan
[c*x])^(p + 1))/(b*e*(p + 1)), x] - Dist[1/(c*d), Int[(a + b*ArcTan[c*x])^p/(I - c*x), x], x] /; FreeQ[{a, b,
c, d, e}, x] && EqQ[e, c^2*d] && IGtQ[p, 0]

Rule 4854

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTan[c*x])^p*Lo
g[2/(1 + (e*x)/d)])/e, x] + Dist[(b*c*p)/e, Int[((a + b*ArcTan[c*x])^(p - 1)*Log[2/(1 + (e*x)/d)])/(1 + c^2*x^
2), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 + e^2, 0]

Rule 2402

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> -Dist[e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rubi steps

\begin{align*} \int \left (a+b \tan ^{-1}(c+d x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \left (a+b \tan ^{-1}(x)\right )^2 \, dx,x,c+d x\right )}{d}\\ &=\frac{(c+d x) \left (a+b \tan ^{-1}(c+d x)\right )^2}{d}-\frac{(2 b) \operatorname{Subst}\left (\int \frac{x \left (a+b \tan ^{-1}(x)\right )}{1+x^2} \, dx,x,c+d x\right )}{d}\\ &=\frac{i \left (a+b \tan ^{-1}(c+d x)\right )^2}{d}+\frac{(c+d x) \left (a+b \tan ^{-1}(c+d x)\right )^2}{d}+\frac{(2 b) \operatorname{Subst}\left (\int \frac{a+b \tan ^{-1}(x)}{i-x} \, dx,x,c+d x\right )}{d}\\ &=\frac{i \left (a+b \tan ^{-1}(c+d x)\right )^2}{d}+\frac{(c+d x) \left (a+b \tan ^{-1}(c+d x)\right )^2}{d}+\frac{2 b \left (a+b \tan ^{-1}(c+d x)\right ) \log \left (\frac{2}{1+i (c+d x)}\right )}{d}-\frac{\left (2 b^2\right ) \operatorname{Subst}\left (\int \frac{\log \left (\frac{2}{1+i x}\right )}{1+x^2} \, dx,x,c+d x\right )}{d}\\ &=\frac{i \left (a+b \tan ^{-1}(c+d x)\right )^2}{d}+\frac{(c+d x) \left (a+b \tan ^{-1}(c+d x)\right )^2}{d}+\frac{2 b \left (a+b \tan ^{-1}(c+d x)\right ) \log \left (\frac{2}{1+i (c+d x)}\right )}{d}+\frac{\left (2 i b^2\right ) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1+i (c+d x)}\right )}{d}\\ &=\frac{i \left (a+b \tan ^{-1}(c+d x)\right )^2}{d}+\frac{(c+d x) \left (a+b \tan ^{-1}(c+d x)\right )^2}{d}+\frac{2 b \left (a+b \tan ^{-1}(c+d x)\right ) \log \left (\frac{2}{1+i (c+d x)}\right )}{d}+\frac{i b^2 \text{Li}_2\left (1-\frac{2}{1+i (c+d x)}\right )}{d}\\ \end{align*}

Mathematica [A]  time = 0.0730931, size = 109, normalized size = 1.07 \[ \frac{-i b^2 \text{PolyLog}\left (2,-e^{2 i \tan ^{-1}(c+d x)}\right )+a \left (a c+a d x+2 b \log \left (\frac{1}{\sqrt{(c+d x)^2+1}}\right )\right )+2 b \tan ^{-1}(c+d x) \left (a c+a d x+b \log \left (1+e^{2 i \tan ^{-1}(c+d x)}\right )\right )+b^2 (c+d x-i) \tan ^{-1}(c+d x)^2}{d} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*ArcTan[c + d*x])^2,x]

[Out]

(b^2*(-I + c + d*x)*ArcTan[c + d*x]^2 + 2*b*ArcTan[c + d*x]*(a*c + a*d*x + b*Log[1 + E^((2*I)*ArcTan[c + d*x])
]) + a*(a*c + a*d*x + 2*b*Log[1/Sqrt[1 + (c + d*x)^2]]) - I*b^2*PolyLog[2, -E^((2*I)*ArcTan[c + d*x])])/d

________________________________________________________________________________________

Maple [A]  time = 0.105, size = 180, normalized size = 1.8 \begin{align*} \left ( \arctan \left ( dx+c \right ) \right ) ^{2}x{b}^{2}-{\frac{i \left ( \arctan \left ( dx+c \right ) \right ) ^{2}{b}^{2}}{d}}+{\frac{ \left ( \arctan \left ( dx+c \right ) \right ) ^{2}{b}^{2}c}{d}}+2\,\arctan \left ( dx+c \right ) xab+2\,{\frac{\arctan \left ( dx+c \right ){b}^{2}}{d}\ln \left ({\frac{ \left ( 1+i \left ( dx+c \right ) \right ) ^{2}}{1+ \left ( dx+c \right ) ^{2}}}+1 \right ) }+2\,{\frac{\arctan \left ( dx+c \right ) abc}{d}}-{\frac{i{b}^{2}}{d}{\it polylog} \left ( 2,-{\frac{ \left ( 1+i \left ( dx+c \right ) \right ) ^{2}}{1+ \left ( dx+c \right ) ^{2}}} \right ) }+{a}^{2}x-{\frac{ab\ln \left ( 1+ \left ( dx+c \right ) ^{2} \right ) }{d}}+{\frac{{a}^{2}c}{d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctan(d*x+c))^2,x)

[Out]

arctan(d*x+c)^2*x*b^2-I/d*arctan(d*x+c)^2*b^2+1/d*arctan(d*x+c)^2*b^2*c+2*arctan(d*x+c)*x*a*b+2/d*arctan(d*x+c
)*ln((1+I*(d*x+c))^2/(1+(d*x+c)^2)+1)*b^2+2/d*arctan(d*x+c)*a*b*c-I/d*polylog(2,-(1+I*(d*x+c))^2/(1+(d*x+c)^2)
)*b^2+a^2*x-1/d*a*b*ln(1+(d*x+c)^2)+a^2*c/d

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(d*x+c))^2,x, algorithm="maxima")

[Out]

1/16*(12*c^2*arctan(d*x + c)^2*arctan((d^2*x + c*d)/d)/d - 4*(3*arctan(d*x + c)*arctan((d^2*x + c*d)/d)^2/d -
arctan((d^2*x + c*d)/d)^3/d)*c^2 + 4*x*arctan(d*x + c)^2 + 192*d^2*integrate(1/16*x^2*arctan(d*x + c)^2/(d^2*x
^2 + 2*c*d*x + c^2 + 1), x) + 16*d^2*integrate(1/16*x^2*log(d^2*x^2 + 2*c*d*x + c^2 + 1)^2/(d^2*x^2 + 2*c*d*x
+ c^2 + 1), x) + 384*c*d*integrate(1/16*x*arctan(d*x + c)^2/(d^2*x^2 + 2*c*d*x + c^2 + 1), x) + 64*d^2*integra
te(1/16*x^2*log(d^2*x^2 + 2*c*d*x + c^2 + 1)/(d^2*x^2 + 2*c*d*x + c^2 + 1), x) + 32*c*d*integrate(1/16*x*log(d
^2*x^2 + 2*c*d*x + c^2 + 1)^2/(d^2*x^2 + 2*c*d*x + c^2 + 1), x) + 64*c*d*integrate(1/16*x*log(d^2*x^2 + 2*c*d*
x + c^2 + 1)/(d^2*x^2 + 2*c*d*x + c^2 + 1), x) + 16*c^2*integrate(1/16*log(d^2*x^2 + 2*c*d*x + c^2 + 1)^2/(d^2
*x^2 + 2*c*d*x + c^2 + 1), x) - x*log(d^2*x^2 + 2*c*d*x + c^2 + 1)^2 + 12*arctan(d*x + c)^2*arctan((d^2*x + c*
d)/d)/d - 12*arctan(d*x + c)*arctan((d^2*x + c*d)/d)^2/d + 4*arctan((d^2*x + c*d)/d)^3/d - 128*d*integrate(1/1
6*x*arctan(d*x + c)/(d^2*x^2 + 2*c*d*x + c^2 + 1), x) + 16*integrate(1/16*log(d^2*x^2 + 2*c*d*x + c^2 + 1)^2/(
d^2*x^2 + 2*c*d*x + c^2 + 1), x))*b^2 + a^2*x + (2*(d*x + c)*arctan(d*x + c) - log((d*x + c)^2 + 1))*a*b/d

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (b^{2} \arctan \left (d x + c\right )^{2} + 2 \, a b \arctan \left (d x + c\right ) + a^{2}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(d*x+c))^2,x, algorithm="fricas")

[Out]

integral(b^2*arctan(d*x + c)^2 + 2*a*b*arctan(d*x + c) + a^2, x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \operatorname{atan}{\left (c + d x \right )}\right )^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atan(d*x+c))**2,x)

[Out]

Integral((a + b*atan(c + d*x))**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \arctan \left (d x + c\right ) + a\right )}^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(d*x+c))^2,x, algorithm="giac")

[Out]

integrate((b*arctan(d*x + c) + a)^2, x)